package com.pjedu.nbmallshop.mapper;

import com.pjedu.nbmallshop.entity.MallGoodsInfo;
import com.pjedu.nbmallshop.entity.StockNumDTO;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;

public interface MallGoodsInfoMapper {
    int deleteByPrimaryKey(Long goodsId);

    int insert(MallGoodsInfo record);

    int insertSelective(MallGoodsInfo record);

    MallGoodsInfo selectByPrimaryKey(Long goodsId);

    int updateByPrimaryKeySelective(MallGoodsInfo record);

    int updateByPrimaryKeyWithBLOBs(MallGoodsInfo record);

    int updateByPrimaryKey(MallGoodsInfo record);

    List<MallGoodsInfo> findMallGoodsList(HashMap pageUtil);

    int getTotalMallGoods(HashMap pageUtil);

    List<MallGoodsInfo> selectByPrimaryKeys(List<Long> goodsIds);

    List<MallGoodsInfo> findMallGoodsListBySearch(HashMap pageUtil);

    int getTotalMallGoodsBySearch(HashMap pageUtil);

    int batchInsert(@Param("mallGoodsList") List<MallGoodsInfo> mallGoodsList);

    int updateStockNum(@Param("stockNumDTOS") List<StockNumDTO> stockNumDTOS);

    int batchUpdateSellStatus(@Param("orderIds")Long[] orderIds,@Param("sellStatus") int sellStatus);

}